/******************************************************************************

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

*******************************************************************************/

import java.util.*;

public class Main
{
  public static void main (String[]args)
  {

    Scanner myObj = new Scanner (System.in);	// Create a Scanner object
    
    System.out.println ("Enter numerator:");

    double num = myObj.nextInt ();	// Read numbers
    
    System.out.println ("Enter denominator:");
    
    double den = myObj.nextInt ();	// Read numbers
    
    double answerWhole = Math.floor(num/den);
    
    int numInt = (int)num;
    int denInt = (int)den;
    int answerWholeInt = (int)answerWhole;
    
    System.out.println (answerWholeInt + " and " + numInt%denInt + "/" + denInt);
    

  }
}